package cn.south.campus.common.exceptions;


import cn.south.campus.common.model.enums.ResponseCode;

/**
 * <p>
 *
 * </p>
 *
 * @author chow
 * @since 2022/5/7 16:19
 */
public class BusinessException extends RuntimeException {

    private String code;
    private String desc;
    private String tips;

    public BusinessException(ResponseCode responseCodeEnums) {
        super(responseCodeEnums.getCode());
        this.code = responseCodeEnums.getCode();
        this.desc = responseCodeEnums.getDesc();
        this.tips = responseCodeEnums.getTips();
    }

    public BusinessException(ResponseCode responseCodeEnums, Throwable throwable) {
        super(responseCodeEnums.getCode(), throwable);
        this.code = responseCodeEnums.getCode();
        this.desc = responseCodeEnums.getDesc();
        this.tips = responseCodeEnums.getTips();
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }
}
